{extend name='base'/}
{block name='content'}
<ol class="breadcrumb" style="background-color: #f9f9f9;padding:8px 0;margin-bottom:10px;">
	<li>
		<a href=""><i class="fa fa-cogs"></i>
			规则管理</a>
	</li>
	<li class="active">
		<a href="{:url('index')}">规则列表</a>
	</li>
</ol>
<ul class="nav nav-tabs" role="tablist">
	<li ><a href="{:url('index')}">规则列表</a></li>
	<li class="active"><a href="{:url('add')}">规则添加</a></li>
</ul>
<form action="" method="POST" class="form-horizontal" role="form">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">规则管理</h3>
		</div>
		<div class="panel-body">
			<div class="form-group">
				<label for="" class="col-sm-2 control-label">规则中文名称</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="title" placeholder="分类列表">
				</div>
			</div>
			<div class="form-group">
				<label for="" class="col-sm-2 control-label">规则标识</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="name" placeholder="admin/category/index">
				</div>
			</div>
			<div class="form-group">
				<label for="" class="col-sm-2 control-label">父规则</label>
				<div class="col-sm-10">
					<select name="pid" id="inputID" class="form-control">
						<option value="0">顶级规则</option>
						{foreach name="treeData" item="v"}
						<option value="{$v['id']}">{$v['_title']}</option>
						{/foreach}
					</select>
				</div>
			</div>
			<!--<div class="form-group">-->
				<!--<label for="" class="col-sm-2 control-label">附加规则</label>-->
				<!--<div class="col-sm-10">-->
					<!--<input type="text" class="form-control" name="condition" placeholder="{score>100}">-->
				<!--</div>-->
			<!--</div>-->
			<div class="form-group">
				<label for="" class="col-sm-2 control-label">导航</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="nav" placeholder="分类管理">
				</div>
			</div>
		</div>
	</div>
	<button class="btn btn-primary">提交</button>
</form>


<script>
	function del(uid) {
		util.confirm('确认删除吗',function(){
			location.href = "{:url('del')}" + "?uid=" + uid;
		});
	}
</script>
{/block}